<%@ page language="java" pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<s:form method="post" id="form" action="updateGeneralCategory.htm"
	theme="simple">
	<s:hidden name="categoryId" value="%{categoryId}" />
	<table class="verdana12blacknormal" width="100%">
		<tbody>
			<tr>
				<td height="40" class="sectionheading bottom-border">
					Category Manager Form
				</td>
			</tr>

			<tr align="left">
				<td>
					<s:a href="showCategoryManager.htm" cssClass="verdana11greynormal">Top</s:a>
					<s:set name="id" value="%{categoryId}" />
					<s:iterator value="generalCategoriesNamesList">
										&nbsp;&gt;
										<s:if test="%{#id == categoryId}">
							<font class="verdana11greynormal"> <s:property value="categoryName" /> </font>
						</s:if>

						<s:else>

							<s:a cssClass="verdana11greynormal"
								href="showCategoryManager.htm?categoryId=%{categoryId}">
								<s:property value="categoryName"/>
							</s:a>
						</s:else>
					</s:iterator>
				</td>
			</tr>
		</tbody>
	</table>

	<table class="verdana12blacknormal" width="100%">
		<tbody>
			<tr>
				<td>
					<s:actionerror cssClass="Note-red" />
					<s:fielderror cssClass="Note-red"></s:fielderror>
				</td>
			</tr>
			<tr>
				<td colspan="2" width="100%">
					<table>
						<tbody>
							<tr>
								<td>
									<table>
										<tbody>
											<tr>
												<td align="right" class="verdana12blacknormal">
													Category ID #:
												</td>
												<td class="Textfiled-border verdana12blacknormal">
													<s:text name="%{categoryId}" />
												</td>
											</tr>
											<tr>
												<td align="right" class="verdana12blacknormal">
													Parent Category ID #:
												</td>
												<td align="left" bgcolor="#E9E9E9"
													class="verdana12darkgreybold">
													<s:textfield name="parentCategoryId"  cssClass="Textfiled-border"
														value="%{parentCategoryId}" theme="simple" />
													<SPAN class="verdana12blacknormal">
													Change to move category to another parent</SPAN>
												</td>
											</tr>
											<tr>
												<td align="right" class="verdana12blacknormal">
													Category Active?:
												</td>
												<td>
													<s:checkbox  cssClass="Textfiled-border"  name="active" value="%{active}" theme="simple" />
												</td>
											</tr>

											<tr>
												<td align="right" class="verdana12blacknormal">
													Accept Submissions?:
												</td>
												<td>
													<s:checkbox   cssClass="Textfiled-border" name="accept" value="%{accept}" theme="simple" />
												</td>
											</tr>
											<tr>
												<td align="right" class="verdana12blacknormal">
													Category Teaser?:
												</td>
												<td>
													<s:checkbox  cssClass="Textfiled-border"  name="categoryTeaser" value="%{categoryTeaser}"
														theme="simple" />
												</td>
											</tr>

											<tr>
												<td align="right" class="verdana12blacknormal">
													Request Adult Verification?:
												</td>

												<td>
													<s:checkbox  cssClass="Textfiled-border"  name="adult" value="%{adult}" theme="simple" />
												</td>
											</tr>

											<tr>
												<td align="right" class="verdana12blacknormal">
													Request User Login?:
												</td>
												<td>
													<s:checkbox  cssClass="Textfiled-border"  name="login" value="%{login}" theme="simple" />
												</td>
											</tr>

											<tr>
												<td align="right" class="verdana12blacknormal">
													Sort Order:
												</td>
												<td>
													<s:textfield  cssClass="Textfiled-border"  name="sortOrder" value="%{sortOrder}"
														theme="simple" />
												</td>
											</tr>
											 <tr>
												<td align="right" class="verdana12blacknormal">
													Type:
												</td>
												<td class="verdana12blacknormal">
													<s:property value="%{type.type}" />
													<s:hidden name="type.id" value="%{type.id}" />
												</td>
											</tr>
											<tr>
												<td align="right" class="verdana12blacknormal">
													Icon File:
												</td>
												<td>
													<s:textfield   cssClass="Textfiled-border" name="icon" value="%{icon}" theme="simple" />
													<s:select list="#{'0':'','1':'Apply icon to sub categories (1 level)','2':'Apply icon to sub categories tree'}" name="iconSelectedOptions" theme="simple" cssClass="Textfiled-border"></s:select>

												</td>
											</tr>

											<tr>
												<td align="right" class="verdana12blacknormal">
													Template:
												</td>
												<td>
													<s:textfield  cssClass="Textfiled-border" name="template" value="%{template}"
														theme="simple" />
														<s:select list="#{'0':'','1':'Apply template to sub categories (1 level)','2':'Apply template to sub categories tree'}" name="templateSelectedOptions" theme="simple" cssClass="Textfiled-border"></s:select>
												</td>
											</tr>

											<tr>
												<td align="right" class="verdana12blacknormal">
													Custom Fields Format:
												</td>
												<td>
													<s:select name="format" list="#{'':''}" theme="simple"  cssClass="Textfiled-border"  />

													<br>
													<select name="ApplyFormat" size="1" class="Textfiled-border" >
														<option value="0" selected="selected"></option>
														<option value="1">
															Apply format to sub categories (1 level)
														</option>
														<option value="2">
															Apply format to sub categories tree
														</option>
													</select>
												</td>
											</tr>

											<tr>
												<td align="right" class="verdana12blacknormal">
													Category Name:
												</td>
												<td>
													<s:textfield name="categoryName" value="%{categoryName}"  cssClass="Textfiled-border"
														theme="simple" />
													<SPAN class="verdana12blacknormal">HTML allowed</SPAN>
												</td>
											</tr>
											<tr>
												<td align="right" class="verdana12blacknormal">
													Description:
												</td>

												<td>
													<s:textarea rows="7" cols="50" name="description"  cssClass="Textfiled-border"
														value="%{description}" theme="simple" />
													<br>
													<SPAN class="verdana12blacknormal">HTML allowed</SPAN>
												</td>
											</tr>
											<tr>
												<td align="right" class="verdana12blacknormal">
													Category Meta Title:
												</td>
												<td>
													<s:textfield size="55" name="metaTitle"  cssClass="Textfiled-border"
														value="%{metaTitle}" theme="simple" />

												</td>
											</tr>
											<tr>
												<td align="right" class="verdana12blacknormal">
													Category Meta Description:
												</td>

												<td>
													<s:textarea rows="7" cols="50" name="metaDescription"  cssClass="Textfiled-border"
														value="%{metaDescription}" theme="simple" />
												</td>
											</tr>
											<tr>
												<td align="right" class="verdana12blacknormal">
													Category Meta Keywords:
												</td>
												<td>
													<s:textarea rows="7" cols="50" name="metaKeywords"  cssClass="Textfiled-border"
														value="%{metaKeywords}" theme="simple" />
												</td>
											</tr>
											<tr>
												<td colspan="2" align="center">
													<s:submit type="image"
														src="../Admin-Images/save-chagnes-button.gif" />
													<img style="cursor: pointer;"
														onclick="document.getElementById('form').reset();"
														src="../Admin-Images/reset-button.gif" alt="Reset">
												</td>
											</tr>
										</tbody>
									</table>
								</td>
							</tr>
						</tbody>
					</table>
				</td>
			</tr>
		</tbody>
	</table>
</s:form>